package com.mcxx.modules.temporary.family.service.read;

import com.mcxx.modules.base.utils.QueryParamUtil;
import com.mcxx.modules.miniSalvation.check.dto.CheckMemberDTO;
import com.mcxx.modules.miniSalvation.check.dto.IntegrateCheckMemberDTO;
import com.mcxx.modules.miniSalvation.family.dto.FamilyMemberDTO;
import com.mcxx.modules.miniSalvation.order.dto.FamInfoDTO;
import com.mcxx.modules.temporary.family.dto.TempMemberCardRtnDTO;
import com.mcxx.modules.temporary.family.dto.TmpFamilyMemberDTO;
import com.mcxx.modules.temporary.family.entity.TmpFamilyMemberEntity;
import com.mcxx.modules.temporary.family.dao.read.TmpFamilyMemberReadDao;
import com.mcxx.modules.temporary.fundpay.dto.TmpCapitalFundSaveObjectDTO;
import com.mcxx.modules.temporary.fundpay.dto.TmpFundPayDTO;
import com.mcxx.modules.temporary.fundpay.dto.TmpFundPayMemberDTO;
import com.mcxx.modules.temporary.fundpay.entity.TmpFundPayEntity;
import com.mcxx.modules.temporary.fundpay.entity.TmpFundPayMemberEntity;
import com.mcxx.modules.temporary.fundpay.param.TmpFundPayParam;
import com.mcxx.modules.temporary.order.entity.TmpOrderEntity;
import com.yinhai.ta404.core.restservice.requestbean.PageParam;
import com.yinhai.ta404.core.restservice.resultbean.Page;
import com.yinhai.ta404.core.security.vo.UserAccountVo;
import com.yinhai.ta404.core.transaction.annotation.TaTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
@TaTransactional(readOnly = true)
public class TmpFamilyMemberReadService {

    @Autowired
    private TmpFamilyMemberReadDao tmpFamilyMemberReadDao;


    public List<TmpFamilyMemberEntity> listAll() {
    	return tmpFamilyMemberReadDao.listAll();
    }


    public List<TmpFamilyMemberDTO> getByFamilyId(String familyId, String isSaveObject) {
    	return tmpFamilyMemberReadDao.getByFamilyId(familyId, isSaveObject);
    }


    public List<TmpFamilyMemberDTO> getByFamilyIdAndReason(String familyId,String mainReason,String beginOfYear,String endOfYear) {
        return tmpFamilyMemberReadDao.getByFamilyIdAndReason(familyId, mainReason,beginOfYear,endOfYear);
    }


    public TmpFamilyMemberEntity getById(String id) {
    	return tmpFamilyMemberReadDao.getById(id);
    }


    public TmpFamilyMemberDTO getByIdAndBusinessCode(String id, String businessCode) {
        return tmpFamilyMemberReadDao.getByIdAndBusinessCode(id,businessCode);
    }


    public TmpFamilyMemberEntity getByIdCard(String idcard) {
        return tmpFamilyMemberReadDao.getByIdCard(idcard);
    }


    public List<TmpFamilyMemberEntity> listByFamilyId(String familyId) {
        return tmpFamilyMemberReadDao.listByFamilyId(familyId);
    }


    public Map<String, Integer> countMemberNumAndSaveMemberNum(String familyId) {
        return tmpFamilyMemberReadDao.countMemberNumAndSaveMemberNum(familyId);
    }


    public List<TmpFamilyMemberEntity> getFamilyRelationMap(String familyId) {
        return tmpFamilyMemberReadDao.getFamilyRelationMapByFamilyId(familyId);
    }


    public Map<String, String> getMemberIdAndFamilyIdByIdCard(String idcard) {
        return tmpFamilyMemberReadDao.getMemberIdAndFamilyIdByIdCard(idcard);
    }


    public String getFamilyIdByIdCard(String idcard) {
        return tmpFamilyMemberReadDao.getFamilyIdByIdCard(idcard);
    }



    public List<TempMemberCardRtnDTO> queryMemberByCardId(String idcard){ return tmpFamilyMemberReadDao.queryMemberByCardId(idcard); }

    public List<CheckMemberDTO> selectMemberListInfo(String memberId){return tmpFamilyMemberReadDao.selectMemberListInfo(memberId);}


    public int cntInfoComplete(String familyId){
        return tmpFamilyMemberReadDao.cntInfoComplete(familyId);
    }

    public int cntFamilyMaster(String familyId){return tmpFamilyMemberReadDao.cntFamilyMaster(familyId);}

    public String selectMasterIdcard(String familyId){return tmpFamilyMemberReadDao.selectMasterIdcard(familyId);}

    public String cntCompleteInfoNum(String familyId){return tmpFamilyMemberReadDao.cntCompleteInfoNum(familyId);}

    public TmpFamilyMemberEntity getMasertInfo(String familyId){return tmpFamilyMemberReadDao.getMasertInfo(familyId);}


    public String getRelationByMemberId(String memberId,String familyId){
        return tmpFamilyMemberReadDao.getRelationByMemberId(memberId,familyId);
    }

    public List<String> getUniqueMaster(List<String> familyIds){
        return tmpFamilyMemberReadDao.getUniqueMaster(familyIds);
    }

    public List<String> cntCompleteMemberInfo(List<String> familyIds){
        return tmpFamilyMemberReadDao.cntCompleteMemberInfo(familyIds);
    }

    public List<TmpFamilyMemberEntity> getFamilyApplyMapByFamilyId(String familyId){
        return tmpFamilyMemberReadDao.getFamilyApplyMapByFamilyId(familyId);
    }

    public TmpFamilyMemberEntity getApplyByFamilyId(String familyId){
        return tmpFamilyMemberReadDao.getApplyByFamilyId(familyId);
    }

    public List<IntegrateCheckMemberDTO> selectIntegrateMember(String orderId,String familyId){
        return tmpFamilyMemberReadDao.selectIntegrateMember(orderId,familyId);
    }

    public List<TmpFamilyMemberEntity> getTempMemberByIdCards(List<String> idCards) {
        return tmpFamilyMemberReadDao.getTempMemberByIdCards(idCards);
    }


    public List<String> getFamilyInfoByMemberIdCards(List<String> idCards) {
        return tmpFamilyMemberReadDao.getFamilyInfoByMemberIdCards(idCards);
    }

    public List<String> getTempMemberByFamilyId(String familyId) {
        return tmpFamilyMemberReadDao.getTempMemberByFamilyId(familyId);
    }
}
